<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-zhGameArea-edit" th:object="${zhGameArea}">
            <input id="id" name="id" th:field="*{id}"  type="hidden">
<!--			// TODO 这里根据条件隐藏-->
			<div th:if="${zhGameArea.parentId!=0}" class="form-group">
				<label class="col-sm-3 control-label">大区：</label>
				<div class="col-sm-8">
					<input id="parentId" name="parentId" th:field="*{parentId}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">区服名称：</label>
				<div class="col-sm-8">
					<input id="name" name="name" th:field="*{name}" class="form-control" type="text">
				</div>
			</div>


			<div class="form-group">
				<label class="col-sm-3 control-label">游戏名称：</label>
				<div class="col-sm-8">
					<select id="gameId" name="gameId" class="form-control m-b" >
						<option th:each="item:${zhGameInfos}" th:value="${item.id}" th:text="${item.name}" th:field="*{gameId}"></option>
					</select>
				</div>
			</div>

			<div class="form-group">	
				<label class="col-sm-3 control-label">排序：</label>
				<div class="col-sm-8">
					<input id="sorting" name="sorting" th:field="*{sorting}" class="form-control" type="text">
				</div>
			</div>
<!--			<div class="form-group">-->
<!--				<label class="col-sm-3 control-label">站点：</label>-->
<!--				<div class="col-sm-8">-->
<!--					<select id="deptId" name="deptId" class="form-control m-b" th:field="*{deptId}">-->
<!--						<option th:each="zhDept:${zhDepts}" th:value="${zhDept.deptId}" th:text="${zhDept.name}" th:field="*{deptId}"></option>-->
<!--					</select>-->
<!--				</div>-->
<!--			</div>-->
			<div class="form-group">
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<textarea id="remark" name="remark" class="form-control" th:field="*{remark}"></textarea>
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "system/zhGameArea";
		$("#form-zhGameArea-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			}
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-zhGameArea-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
